package net.qhzw.geologr5.gis.service.system.utils;


import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.Objects;

public class SftpBean {

    /**
     * 用户名。
     */
    @NotBlank(message = "userNamecan not be null")
    private String userName;
    /**
     * 加密key。
     */
    private String secretKey;
    /**
     * ip.
     */
    @NotBlank(message = "host not be null")
    private String host;
    /**
     * 端口.
     */
    @NotNull(message = "port not be null")
    private int port;

    /**
     * ssh.
     */
    private String privateKey;
    /**
     * sftp路径.
     */
    @NotBlank(message = "sftpPath not be null")
    private String sftpPath;

    /**
     * 备份路径.
     */
    private String sftpBackupPath;

    public SftpBean() {

    }

    /**
     * 构造方法.
     * @param userName
     * @param secretKey
     * @param host
     * @param port
     * @param privateKey
     */
    public SftpBean(String userName, String secretKey, String host, int port, String privateKey) {
        super();
        this.userName = userName;
        this.secretKey = secretKey;
        this.host = host;
        this.port = port;
        this.privateKey = privateKey;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getSecretKey() {
        return secretKey;
    }

    public void setSecretKey(String password) {
        this.secretKey = password;
    }

    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getPrivateKey() {
        return privateKey;
    }

    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }

    public String getSftpPath() {
        return sftpPath;
    }

    public void setSftpPath(String sftpPath) {
        this.sftpPath = sftpPath;
    }



    @Override
    public int hashCode() {
        return Objects.hash(userName, secretKey, host, port, privateKey, sftpPath);
    }

    /**
     * 获取
     *
     * @return sftpBackPath
     */
    public String getSftpBackupPath() {
        return this.sftpBackupPath;
    }

    /**
     * 设置
     *
     * @param sftpBackupPath
     */
    public void setSftpBackupPath(String sftpBackupPath) {
        this.sftpBackupPath = sftpBackupPath;
    }


}
